{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# OpenDataTools 支持加密数字货币数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 导入coin接口\n",
    "from opendatatools import coin\n",
    "\n",
    "# 注：数据来源 - cryptocompare.com\n",
    "coin.set_proxies({\"https\" : \"https://127.0.0.1:1080\"})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Algorithm</th>\n",
       "      <th>CoinName</th>\n",
       "      <th>FullName</th>\n",
       "      <th>FullyPremined</th>\n",
       "      <th>Id</th>\n",
       "      <th>ImageUrl</th>\n",
       "      <th>Name</th>\n",
       "      <th>PreMinedValue</th>\n",
       "      <th>ProofType</th>\n",
       "      <th>SortOrder</th>\n",
       "      <th>Sponsored</th>\n",
       "      <th>Symbol</th>\n",
       "      <th>TotalCoinSupply</th>\n",
       "      <th>TotalCoinsFreeFloat</th>\n",
       "      <th>Url</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>007</th>\n",
       "      <td>Scrypt</td>\n",
       "      <td>007 coin</td>\n",
       "      <td>007 coin (007)</td>\n",
       "      <td>0</td>\n",
       "      <td>5294</td>\n",
       "      <td>/media/350595/007.png</td>\n",
       "      <td>007</td>\n",
       "      <td>N/A</td>\n",
       "      <td>PoW</td>\n",
       "      <td>263</td>\n",
       "      <td>False</td>\n",
       "      <td>007</td>\n",
       "      <td>989800</td>\n",
       "      <td>N/A</td>\n",
       "      <td>/coins/007/overview</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1337</th>\n",
       "      <td>X13</td>\n",
       "      <td>1337</td>\n",
       "      <td>1337 (1337)</td>\n",
       "      <td>0</td>\n",
       "      <td>20824</td>\n",
       "      <td>/media/350976/1337.png</td>\n",
       "      <td>1337</td>\n",
       "      <td>N/A</td>\n",
       "      <td>PoW/PoS</td>\n",
       "      <td>577</td>\n",
       "      <td>False</td>\n",
       "      <td>1337</td>\n",
       "      <td>314159265359</td>\n",
       "      <td>N/A</td>\n",
       "      <td>/coins/1337/overview</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1CR</th>\n",
       "      <td>Scrypt</td>\n",
       "      <td>1Credit</td>\n",
       "      <td>1Credit (1CR)</td>\n",
       "      <td>0</td>\n",
       "      <td>5406</td>\n",
       "      <td>/media/20175/1cr.png</td>\n",
       "      <td>1CR</td>\n",
       "      <td>N/A</td>\n",
       "      <td>PoW</td>\n",
       "      <td>374</td>\n",
       "      <td>False</td>\n",
       "      <td>1CR</td>\n",
       "      <td>92000000000</td>\n",
       "      <td>N/A</td>\n",
       "      <td>/coins/1cr/overview</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1ST</th>\n",
       "      <td>N/A</td>\n",
       "      <td>FirstBlood</td>\n",
       "      <td>FirstBlood (1ST)</td>\n",
       "      <td>1</td>\n",
       "      <td>28328</td>\n",
       "      <td>/media/351524/1st.png</td>\n",
       "      <td>1ST</td>\n",
       "      <td>N/A</td>\n",
       "      <td>N/A</td>\n",
       "      <td>759</td>\n",
       "      <td>False</td>\n",
       "      <td>1ST</td>\n",
       "      <td>93468691</td>\n",
       "      <td>N/A</td>\n",
       "      <td>/coins/1st/overview</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015</th>\n",
       "      <td>X11</td>\n",
       "      <td>2015 coin</td>\n",
       "      <td>2015 coin (2015)</td>\n",
       "      <td>0</td>\n",
       "      <td>3744</td>\n",
       "      <td>/media/20180/2015.png</td>\n",
       "      <td>2015</td>\n",
       "      <td>N/A</td>\n",
       "      <td>PoW/PoS</td>\n",
       "      <td>33</td>\n",
       "      <td>False</td>\n",
       "      <td>2015</td>\n",
       "      <td>0</td>\n",
       "      <td>N/A</td>\n",
       "      <td>/coins/2015/overview</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2BACCO</th>\n",
       "      <td>Scrypt</td>\n",
       "      <td>2BACCO Coin</td>\n",
       "      <td>2BACCO Coin (2BACCO)</td>\n",
       "      <td>0</td>\n",
       "      <td>30912</td>\n",
       "      <td>/media/351869/2bacco.png</td>\n",
       "      <td>2BACCO</td>\n",
       "      <td>N/A</td>\n",
       "      <td>PoW/PoS</td>\n",
       "      <td>874</td>\n",
       "      <td>False</td>\n",
       "      <td>2BACCO</td>\n",
       "      <td>81454545</td>\n",
       "      <td>N/A</td>\n",
       "      <td>/coins/2bacco/overview</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2GIVE</th>\n",
       "      <td>Scrypt</td>\n",
       "      <td>2GiveCoin</td>\n",
       "      <td>2GiveCoin (2GIVE)</td>\n",
       "      <td>0</td>\n",
       "      <td>20910</td>\n",
       "      <td>/media/350986/2give.png</td>\n",
       "      <td>2GIVE</td>\n",
       "      <td>N/A</td>\n",
       "      <td>PoW/PoS</td>\n",
       "      <td>587</td>\n",
       "      <td>False</td>\n",
       "      <td>2GIVE</td>\n",
       "      <td>N/A</td>\n",
       "      <td>N/A</td>\n",
       "      <td>/coins/2give/overview</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>300</th>\n",
       "      <td>N/A</td>\n",
       "      <td>300 token</td>\n",
       "      <td>300 token (300)</td>\n",
       "      <td>0</td>\n",
       "      <td>749869</td>\n",
       "      <td>/media/27010595/300.png</td>\n",
       "      <td>300</td>\n",
       "      <td>N/A</td>\n",
       "      <td>N/A</td>\n",
       "      <td>2212</td>\n",
       "      <td>False</td>\n",
       "      <td>300</td>\n",
       "      <td>300</td>\n",
       "      <td>N/A</td>\n",
       "      <td>/coins/300/overview</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32BIT</th>\n",
       "      <td>X11</td>\n",
       "      <td>32Bitcoin</td>\n",
       "      <td>32Bitcoin (32BIT)</td>\n",
       "      <td>0</td>\n",
       "      <td>30428</td>\n",
       "      <td>/media/351763/32bit.png</td>\n",
       "      <td>32BIT</td>\n",
       "      <td>N/A</td>\n",
       "      <td>PoW/PoS</td>\n",
       "      <td>863</td>\n",
       "      <td>False</td>\n",
       "      <td>32BIT</td>\n",
       "      <td>355000</td>\n",
       "      <td>N/A</td>\n",
       "      <td>/coins/32bit/overview</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>365</th>\n",
       "      <td>X11</td>\n",
       "      <td>365Coin</td>\n",
       "      <td>365Coin (365)</td>\n",
       "      <td>0</td>\n",
       "      <td>33639</td>\n",
       "      <td>/media/352070/365.png</td>\n",
       "      <td>365</td>\n",
       "      <td>N/A</td>\n",
       "      <td>PoW/PoS</td>\n",
       "      <td>916</td>\n",
       "      <td>False</td>\n",
       "      <td>365</td>\n",
       "      <td>2300000000</td>\n",
       "      <td>N/A</td>\n",
       "      <td>/coins/365/overview</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       Algorithm     CoinName              FullName FullyPremined      Id  \\\n",
       "007       Scrypt     007 coin        007 coin (007)             0    5294   \n",
       "1337         X13         1337           1337 (1337)             0   20824   \n",
       "1CR       Scrypt      1Credit         1Credit (1CR)             0    5406   \n",
       "1ST          N/A   FirstBlood      FirstBlood (1ST)             1   28328   \n",
       "2015         X11    2015 coin      2015 coin (2015)             0    3744   \n",
       "2BACCO    Scrypt  2BACCO Coin  2BACCO Coin (2BACCO)             0   30912   \n",
       "2GIVE     Scrypt    2GiveCoin     2GiveCoin (2GIVE)             0   20910   \n",
       "300          N/A    300 token       300 token (300)             0  749869   \n",
       "32BIT        X11    32Bitcoin     32Bitcoin (32BIT)             0   30428   \n",
       "365          X11      365Coin         365Coin (365)             0   33639   \n",
       "\n",
       "                        ImageUrl    Name PreMinedValue ProofType SortOrder  \\\n",
       "007        /media/350595/007.png     007           N/A       PoW       263   \n",
       "1337      /media/350976/1337.png    1337           N/A   PoW/PoS       577   \n",
       "1CR         /media/20175/1cr.png     1CR           N/A       PoW       374   \n",
       "1ST        /media/351524/1st.png     1ST           N/A       N/A       759   \n",
       "2015       /media/20180/2015.png    2015           N/A   PoW/PoS        33   \n",
       "2BACCO  /media/351869/2bacco.png  2BACCO           N/A   PoW/PoS       874   \n",
       "2GIVE    /media/350986/2give.png   2GIVE           N/A   PoW/PoS       587   \n",
       "300      /media/27010595/300.png     300           N/A       N/A      2212   \n",
       "32BIT    /media/351763/32bit.png   32BIT           N/A   PoW/PoS       863   \n",
       "365        /media/352070/365.png     365           N/A   PoW/PoS       916   \n",
       "\n",
       "       Sponsored  Symbol TotalCoinSupply TotalCoinsFreeFloat  \\\n",
       "007        False     007          989800                 N/A   \n",
       "1337       False    1337    314159265359                 N/A   \n",
       "1CR        False     1CR     92000000000                 N/A   \n",
       "1ST        False     1ST        93468691                 N/A   \n",
       "2015       False    2015               0                 N/A   \n",
       "2BACCO     False  2BACCO        81454545                 N/A   \n",
       "2GIVE      False   2GIVE             N/A                 N/A   \n",
       "300        False     300             300                 N/A   \n",
       "32BIT      False   32BIT          355000                 N/A   \n",
       "365        False     365      2300000000                 N/A   \n",
       "\n",
       "                           Url  \n",
       "007        /coins/007/overview  \n",
       "1337      /coins/1337/overview  \n",
       "1CR        /coins/1cr/overview  \n",
       "1ST        /coins/1st/overview  \n",
       "2015      /coins/2015/overview  \n",
       "2BACCO  /coins/2bacco/overview  \n",
       "2GIVE    /coins/2give/overview  \n",
       "300        /coins/300/overview  \n",
       "32BIT    /coins/32bit/overview  \n",
       "365        /coins/365/overview  "
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 获取数字货币的信息\n",
    "# 从这里可以获取到数字货币的symbol，比如比特币BTC，以太币ETH\n",
    "df, msg = coin.get_coin_list()\n",
    "df.head(10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'EUR': 5670.25, 'USD': 6566.5}"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 获取数字货币的实时行情\n",
    "# 参数：目标币，支付币，交易所（支付币可以是多个，结果返回多个）\n",
    "df, msg = coin.get_coin_price('BTC', 'USD,EUR', 'Bitfinex')\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>close</th>\n",
       "      <th>high</th>\n",
       "      <th>low</th>\n",
       "      <th>open</th>\n",
       "      <th>time</th>\n",
       "      <th>volumefrom</th>\n",
       "      <th>volumeto</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>6457.01</td>\n",
       "      <td>6457.01</td>\n",
       "      <td>6453.90</td>\n",
       "      <td>6455.20</td>\n",
       "      <td>2018-06-19 00:01:00</td>\n",
       "      <td>0.2558</td>\n",
       "      <td>1651.26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>6462.10</td>\n",
       "      <td>6462.10</td>\n",
       "      <td>6457.00</td>\n",
       "      <td>6457.01</td>\n",
       "      <td>2018-06-19 00:02:00</td>\n",
       "      <td>1.0300</td>\n",
       "      <td>6621.59</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>6465.00</td>\n",
       "      <td>6465.00</td>\n",
       "      <td>6462.10</td>\n",
       "      <td>6462.10</td>\n",
       "      <td>2018-06-19 00:03:00</td>\n",
       "      <td>7.2500</td>\n",
       "      <td>46881.14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>6465.10</td>\n",
       "      <td>6465.40</td>\n",
       "      <td>6465.00</td>\n",
       "      <td>6465.00</td>\n",
       "      <td>2018-06-19 00:04:00</td>\n",
       "      <td>21.9600</td>\n",
       "      <td>141975.57</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>6462.60</td>\n",
       "      <td>6465.10</td>\n",
       "      <td>6459.00</td>\n",
       "      <td>6465.10</td>\n",
       "      <td>2018-06-19 00:05:00</td>\n",
       "      <td>16.8500</td>\n",
       "      <td>108918.69</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>6462.50</td>\n",
       "      <td>6462.60</td>\n",
       "      <td>6462.50</td>\n",
       "      <td>6462.60</td>\n",
       "      <td>2018-06-19 00:06:00</td>\n",
       "      <td>0.6809</td>\n",
       "      <td>4400.04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>6462.50</td>\n",
       "      <td>6466.80</td>\n",
       "      <td>6462.50</td>\n",
       "      <td>6462.50</td>\n",
       "      <td>2018-06-19 00:07:00</td>\n",
       "      <td>30.1800</td>\n",
       "      <td>195040.31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>6462.50</td>\n",
       "      <td>6462.60</td>\n",
       "      <td>6462.50</td>\n",
       "      <td>6462.50</td>\n",
       "      <td>2018-06-19 00:08:00</td>\n",
       "      <td>0.1700</td>\n",
       "      <td>1098.90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>6455.10</td>\n",
       "      <td>6462.60</td>\n",
       "      <td>6454.50</td>\n",
       "      <td>6462.50</td>\n",
       "      <td>2018-06-19 00:09:00</td>\n",
       "      <td>25.0300</td>\n",
       "      <td>161746.29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>6461.00</td>\n",
       "      <td>6461.30</td>\n",
       "      <td>6455.10</td>\n",
       "      <td>6455.10</td>\n",
       "      <td>2018-06-19 00:10:00</td>\n",
       "      <td>5.2600</td>\n",
       "      <td>33982.83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>6460.90</td>\n",
       "      <td>6461.00</td>\n",
       "      <td>6460.90</td>\n",
       "      <td>6461.00</td>\n",
       "      <td>2018-06-19 00:11:00</td>\n",
       "      <td>0.9729</td>\n",
       "      <td>6286.07</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>6458.80</td>\n",
       "      <td>6460.90</td>\n",
       "      <td>6456.50</td>\n",
       "      <td>6460.90</td>\n",
       "      <td>2018-06-19 00:12:00</td>\n",
       "      <td>1.2800</td>\n",
       "      <td>8266.42</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>6455.70</td>\n",
       "      <td>6458.80</td>\n",
       "      <td>6455.70</td>\n",
       "      <td>6458.80</td>\n",
       "      <td>2018-06-19 00:13:00</td>\n",
       "      <td>2.3300</td>\n",
       "      <td>15046.40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>6457.20</td>\n",
       "      <td>6457.20</td>\n",
       "      <td>6452.60</td>\n",
       "      <td>6455.70</td>\n",
       "      <td>2018-06-19 00:14:00</td>\n",
       "      <td>10.0700</td>\n",
       "      <td>65022.77</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>6460.10</td>\n",
       "      <td>6460.70</td>\n",
       "      <td>6455.20</td>\n",
       "      <td>6457.20</td>\n",
       "      <td>2018-06-19 00:15:00</td>\n",
       "      <td>28.3200</td>\n",
       "      <td>182947.86</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>6459.10</td>\n",
       "      <td>6461.00</td>\n",
       "      <td>6458.30</td>\n",
       "      <td>6460.10</td>\n",
       "      <td>2018-06-19 00:16:00</td>\n",
       "      <td>20.0200</td>\n",
       "      <td>129342.47</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>6459.80</td>\n",
       "      <td>6460.70</td>\n",
       "      <td>6458.69</td>\n",
       "      <td>6459.10</td>\n",
       "      <td>2018-06-19 00:17:00</td>\n",
       "      <td>30.6500</td>\n",
       "      <td>197995.45</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>6460.30</td>\n",
       "      <td>6460.60</td>\n",
       "      <td>6458.20</td>\n",
       "      <td>6459.80</td>\n",
       "      <td>2018-06-19 00:18:00</td>\n",
       "      <td>0.6565</td>\n",
       "      <td>4240.95</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>6460.90</td>\n",
       "      <td>6460.90</td>\n",
       "      <td>6460.30</td>\n",
       "      <td>6460.30</td>\n",
       "      <td>2018-06-19 00:19:00</td>\n",
       "      <td>10.7000</td>\n",
       "      <td>69144.59</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>6460.90</td>\n",
       "      <td>6460.90</td>\n",
       "      <td>6460.80</td>\n",
       "      <td>6460.90</td>\n",
       "      <td>2018-06-19 00:20:00</td>\n",
       "      <td>2.7600</td>\n",
       "      <td>17828.43</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      close     high      low     open                time  volumefrom  \\\n",
       "0   6457.01  6457.01  6453.90  6455.20 2018-06-19 00:01:00      0.2558   \n",
       "1   6462.10  6462.10  6457.00  6457.01 2018-06-19 00:02:00      1.0300   \n",
       "2   6465.00  6465.00  6462.10  6462.10 2018-06-19 00:03:00      7.2500   \n",
       "3   6465.10  6465.40  6465.00  6465.00 2018-06-19 00:04:00     21.9600   \n",
       "4   6462.60  6465.10  6459.00  6465.10 2018-06-19 00:05:00     16.8500   \n",
       "5   6462.50  6462.60  6462.50  6462.60 2018-06-19 00:06:00      0.6809   \n",
       "6   6462.50  6466.80  6462.50  6462.50 2018-06-19 00:07:00     30.1800   \n",
       "7   6462.50  6462.60  6462.50  6462.50 2018-06-19 00:08:00      0.1700   \n",
       "8   6455.10  6462.60  6454.50  6462.50 2018-06-19 00:09:00     25.0300   \n",
       "9   6461.00  6461.30  6455.10  6455.10 2018-06-19 00:10:00      5.2600   \n",
       "10  6460.90  6461.00  6460.90  6461.00 2018-06-19 00:11:00      0.9729   \n",
       "11  6458.80  6460.90  6456.50  6460.90 2018-06-19 00:12:00      1.2800   \n",
       "12  6455.70  6458.80  6455.70  6458.80 2018-06-19 00:13:00      2.3300   \n",
       "13  6457.20  6457.20  6452.60  6455.70 2018-06-19 00:14:00     10.0700   \n",
       "14  6460.10  6460.70  6455.20  6457.20 2018-06-19 00:15:00     28.3200   \n",
       "15  6459.10  6461.00  6458.30  6460.10 2018-06-19 00:16:00     20.0200   \n",
       "16  6459.80  6460.70  6458.69  6459.10 2018-06-19 00:17:00     30.6500   \n",
       "17  6460.30  6460.60  6458.20  6459.80 2018-06-19 00:18:00      0.6565   \n",
       "18  6460.90  6460.90  6460.30  6460.30 2018-06-19 00:19:00     10.7000   \n",
       "19  6460.90  6460.90  6460.80  6460.90 2018-06-19 00:20:00      2.7600   \n",
       "\n",
       "     volumeto  \n",
       "0     1651.26  \n",
       "1     6621.59  \n",
       "2    46881.14  \n",
       "3   141975.57  \n",
       "4   108918.69  \n",
       "5     4400.04  \n",
       "6   195040.31  \n",
       "7     1098.90  \n",
       "8   161746.29  \n",
       "9    33982.83  \n",
       "10    6286.07  \n",
       "11    8266.42  \n",
       "12   15046.40  \n",
       "13   65022.77  \n",
       "14  182947.86  \n",
       "15  129342.47  \n",
       "16  197995.45  \n",
       "17    4240.95  \n",
       "18   69144.59  \n",
       "19   17828.43  "
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 获取分钟线\n",
    "# 参数：目标币，支付币，交易所\n",
    "df, msg = coin.get_his_min('BTC', 'USD', 'Bitfinex')\n",
    "df.head(20)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>close</th>\n",
       "      <th>high</th>\n",
       "      <th>low</th>\n",
       "      <th>open</th>\n",
       "      <th>time</th>\n",
       "      <th>volumefrom</th>\n",
       "      <th>volumeto</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>7919.10</td>\n",
       "      <td>7941.00</td>\n",
       "      <td>7857.30</td>\n",
       "      <td>7876.27</td>\n",
       "      <td>2018-03-29 01:00:00</td>\n",
       "      <td>828.95</td>\n",
       "      <td>6549768.36</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>7940.00</td>\n",
       "      <td>7946.00</td>\n",
       "      <td>7871.50</td>\n",
       "      <td>7919.10</td>\n",
       "      <td>2018-03-29 02:00:00</td>\n",
       "      <td>517.85</td>\n",
       "      <td>4096937.40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>7896.80</td>\n",
       "      <td>7944.40</td>\n",
       "      <td>7871.22</td>\n",
       "      <td>7940.00</td>\n",
       "      <td>2018-03-29 03:00:00</td>\n",
       "      <td>597.43</td>\n",
       "      <td>4725013.81</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>7892.60</td>\n",
       "      <td>7948.50</td>\n",
       "      <td>7877.00</td>\n",
       "      <td>7896.80</td>\n",
       "      <td>2018-03-29 04:00:00</td>\n",
       "      <td>694.86</td>\n",
       "      <td>5498403.48</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>7869.50</td>\n",
       "      <td>7920.00</td>\n",
       "      <td>7815.70</td>\n",
       "      <td>7892.60</td>\n",
       "      <td>2018-03-29 05:00:00</td>\n",
       "      <td>954.03</td>\n",
       "      <td>7504879.02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>7948.30</td>\n",
       "      <td>8005.00</td>\n",
       "      <td>7861.80</td>\n",
       "      <td>7869.50</td>\n",
       "      <td>2018-03-29 06:00:00</td>\n",
       "      <td>1365.85</td>\n",
       "      <td>10883810.85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>7936.00</td>\n",
       "      <td>7970.90</td>\n",
       "      <td>7909.00</td>\n",
       "      <td>7948.30</td>\n",
       "      <td>2018-03-29 07:00:00</td>\n",
       "      <td>398.46</td>\n",
       "      <td>3163510.22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>7946.82</td>\n",
       "      <td>7957.66</td>\n",
       "      <td>7905.00</td>\n",
       "      <td>7936.00</td>\n",
       "      <td>2018-03-29 08:00:00</td>\n",
       "      <td>417.86</td>\n",
       "      <td>3312474.51</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>7883.78</td>\n",
       "      <td>7973.00</td>\n",
       "      <td>7866.20</td>\n",
       "      <td>7946.82</td>\n",
       "      <td>2018-03-29 09:00:00</td>\n",
       "      <td>699.99</td>\n",
       "      <td>5540030.19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>7895.00</td>\n",
       "      <td>7900.00</td>\n",
       "      <td>7848.70</td>\n",
       "      <td>7883.78</td>\n",
       "      <td>2018-03-29 10:00:00</td>\n",
       "      <td>636.35</td>\n",
       "      <td>5013345.23</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>7861.10</td>\n",
       "      <td>7895.10</td>\n",
       "      <td>7821.00</td>\n",
       "      <td>7895.00</td>\n",
       "      <td>2018-03-29 11:00:00</td>\n",
       "      <td>1009.63</td>\n",
       "      <td>7938397.87</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>7583.90</td>\n",
       "      <td>7861.10</td>\n",
       "      <td>7580.00</td>\n",
       "      <td>7861.10</td>\n",
       "      <td>2018-03-29 12:00:00</td>\n",
       "      <td>6547.33</td>\n",
       "      <td>50223450.09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>7542.10</td>\n",
       "      <td>7667.26</td>\n",
       "      <td>7522.00</td>\n",
       "      <td>7583.90</td>\n",
       "      <td>2018-03-29 13:00:00</td>\n",
       "      <td>3298.22</td>\n",
       "      <td>25073834.39</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>7613.90</td>\n",
       "      <td>7626.00</td>\n",
       "      <td>7516.00</td>\n",
       "      <td>7542.10</td>\n",
       "      <td>2018-03-29 14:00:00</td>\n",
       "      <td>2708.02</td>\n",
       "      <td>20520845.56</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>7534.10</td>\n",
       "      <td>7617.90</td>\n",
       "      <td>7478.00</td>\n",
       "      <td>7613.90</td>\n",
       "      <td>2018-03-29 15:00:00</td>\n",
       "      <td>2710.50</td>\n",
       "      <td>20420485.62</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>7544.70</td>\n",
       "      <td>7581.70</td>\n",
       "      <td>7466.60</td>\n",
       "      <td>7534.10</td>\n",
       "      <td>2018-03-29 16:00:00</td>\n",
       "      <td>2047.73</td>\n",
       "      <td>15405287.49</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>7520.10</td>\n",
       "      <td>7572.00</td>\n",
       "      <td>7475.00</td>\n",
       "      <td>7544.70</td>\n",
       "      <td>2018-03-29 17:00:00</td>\n",
       "      <td>690.87</td>\n",
       "      <td>5199602.32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>7476.80</td>\n",
       "      <td>7536.70</td>\n",
       "      <td>7419.00</td>\n",
       "      <td>7520.10</td>\n",
       "      <td>2018-03-29 18:00:00</td>\n",
       "      <td>2121.26</td>\n",
       "      <td>15856657.55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>7474.00</td>\n",
       "      <td>7502.00</td>\n",
       "      <td>7426.70</td>\n",
       "      <td>7476.80</td>\n",
       "      <td>2018-03-29 19:00:00</td>\n",
       "      <td>1996.56</td>\n",
       "      <td>14906046.09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>7500.00</td>\n",
       "      <td>7559.90</td>\n",
       "      <td>7467.00</td>\n",
       "      <td>7474.00</td>\n",
       "      <td>2018-03-29 20:00:00</td>\n",
       "      <td>1605.66</td>\n",
       "      <td>12061012.56</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      close     high      low     open                time  volumefrom  \\\n",
       "0   7919.10  7941.00  7857.30  7876.27 2018-03-29 01:00:00      828.95   \n",
       "1   7940.00  7946.00  7871.50  7919.10 2018-03-29 02:00:00      517.85   \n",
       "2   7896.80  7944.40  7871.22  7940.00 2018-03-29 03:00:00      597.43   \n",
       "3   7892.60  7948.50  7877.00  7896.80 2018-03-29 04:00:00      694.86   \n",
       "4   7869.50  7920.00  7815.70  7892.60 2018-03-29 05:00:00      954.03   \n",
       "5   7948.30  8005.00  7861.80  7869.50 2018-03-29 06:00:00     1365.85   \n",
       "6   7936.00  7970.90  7909.00  7948.30 2018-03-29 07:00:00      398.46   \n",
       "7   7946.82  7957.66  7905.00  7936.00 2018-03-29 08:00:00      417.86   \n",
       "8   7883.78  7973.00  7866.20  7946.82 2018-03-29 09:00:00      699.99   \n",
       "9   7895.00  7900.00  7848.70  7883.78 2018-03-29 10:00:00      636.35   \n",
       "10  7861.10  7895.10  7821.00  7895.00 2018-03-29 11:00:00     1009.63   \n",
       "11  7583.90  7861.10  7580.00  7861.10 2018-03-29 12:00:00     6547.33   \n",
       "12  7542.10  7667.26  7522.00  7583.90 2018-03-29 13:00:00     3298.22   \n",
       "13  7613.90  7626.00  7516.00  7542.10 2018-03-29 14:00:00     2708.02   \n",
       "14  7534.10  7617.90  7478.00  7613.90 2018-03-29 15:00:00     2710.50   \n",
       "15  7544.70  7581.70  7466.60  7534.10 2018-03-29 16:00:00     2047.73   \n",
       "16  7520.10  7572.00  7475.00  7544.70 2018-03-29 17:00:00      690.87   \n",
       "17  7476.80  7536.70  7419.00  7520.10 2018-03-29 18:00:00     2121.26   \n",
       "18  7474.00  7502.00  7426.70  7476.80 2018-03-29 19:00:00     1996.56   \n",
       "19  7500.00  7559.90  7467.00  7474.00 2018-03-29 20:00:00     1605.66   \n",
       "\n",
       "       volumeto  \n",
       "0    6549768.36  \n",
       "1    4096937.40  \n",
       "2    4725013.81  \n",
       "3    5498403.48  \n",
       "4    7504879.02  \n",
       "5   10883810.85  \n",
       "6    3163510.22  \n",
       "7    3312474.51  \n",
       "8    5540030.19  \n",
       "9    5013345.23  \n",
       "10   7938397.87  \n",
       "11  50223450.09  \n",
       "12  25073834.39  \n",
       "13  20520845.56  \n",
       "14  20420485.62  \n",
       "15  15405287.49  \n",
       "16   5199602.32  \n",
       "17  15856657.55  \n",
       "18  14906046.09  \n",
       "19  12061012.56  "
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 获取小时线\n",
    "# 参数：目标币，支付币，交易所\n",
    "df, msg = coin.get_his_hour('BTC', 'USD', 'Bitfinex')\n",
    "df.head(20)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>close</th>\n",
       "      <th>high</th>\n",
       "      <th>low</th>\n",
       "      <th>open</th>\n",
       "      <th>time</th>\n",
       "      <th>volumefrom</th>\n",
       "      <th>volumeto</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1981</th>\n",
       "      <td>7521.0</td>\n",
       "      <td>7599.80</td>\n",
       "      <td>7329.19</td>\n",
       "      <td>7485.8</td>\n",
       "      <td>2018-06-01 08:00:00</td>\n",
       "      <td>18921.31</td>\n",
       "      <td>1.414552e+08</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1982</th>\n",
       "      <td>7638.1</td>\n",
       "      <td>7698.80</td>\n",
       "      <td>7441.50</td>\n",
       "      <td>7521.0</td>\n",
       "      <td>2018-06-02 08:00:00</td>\n",
       "      <td>16212.57</td>\n",
       "      <td>1.236273e+08</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1983</th>\n",
       "      <td>7718.0</td>\n",
       "      <td>7779.00</td>\n",
       "      <td>7600.00</td>\n",
       "      <td>7638.1</td>\n",
       "      <td>2018-06-03 08:00:00</td>\n",
       "      <td>13548.01</td>\n",
       "      <td>1.044172e+08</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1984</th>\n",
       "      <td>7488.3</td>\n",
       "      <td>7764.00</td>\n",
       "      <td>7451.10</td>\n",
       "      <td>7718.0</td>\n",
       "      <td>2018-06-04 08:00:00</td>\n",
       "      <td>17659.04</td>\n",
       "      <td>1.336573e+08</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1985</th>\n",
       "      <td>7621.9</td>\n",
       "      <td>7675.00</td>\n",
       "      <td>7372.00</td>\n",
       "      <td>7488.3</td>\n",
       "      <td>2018-06-05 08:00:00</td>\n",
       "      <td>16225.75</td>\n",
       "      <td>1.218829e+08</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1986</th>\n",
       "      <td>7654.0</td>\n",
       "      <td>7700.00</td>\n",
       "      <td>7491.70</td>\n",
       "      <td>7621.9</td>\n",
       "      <td>2018-06-06 08:00:00</td>\n",
       "      <td>16375.07</td>\n",
       "      <td>1.244910e+08</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1987</th>\n",
       "      <td>7688.9</td>\n",
       "      <td>7756.30</td>\n",
       "      <td>7624.70</td>\n",
       "      <td>7654.0</td>\n",
       "      <td>2018-06-07 08:00:00</td>\n",
       "      <td>10828.16</td>\n",
       "      <td>8.340476e+07</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1988</th>\n",
       "      <td>7615.1</td>\n",
       "      <td>7697.00</td>\n",
       "      <td>7543.60</td>\n",
       "      <td>7688.9</td>\n",
       "      <td>2018-06-08 08:00:00</td>\n",
       "      <td>12095.39</td>\n",
       "      <td>9.209850e+07</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1989</th>\n",
       "      <td>7498.5</td>\n",
       "      <td>7685.00</td>\n",
       "      <td>7463.40</td>\n",
       "      <td>7615.1</td>\n",
       "      <td>2018-06-09 08:00:00</td>\n",
       "      <td>6642.77</td>\n",
       "      <td>5.046706e+07</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1990</th>\n",
       "      <td>6758.0</td>\n",
       "      <td>7498.60</td>\n",
       "      <td>6630.00</td>\n",
       "      <td>7498.5</td>\n",
       "      <td>2018-06-10 08:00:00</td>\n",
       "      <td>51853.79</td>\n",
       "      <td>3.618638e+08</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1991</th>\n",
       "      <td>6873.3</td>\n",
       "      <td>6899.00</td>\n",
       "      <td>6629.70</td>\n",
       "      <td>6758.0</td>\n",
       "      <td>2018-06-11 08:00:00</td>\n",
       "      <td>22324.10</td>\n",
       "      <td>1.505832e+08</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1992</th>\n",
       "      <td>6543.9</td>\n",
       "      <td>6873.40</td>\n",
       "      <td>6436.10</td>\n",
       "      <td>6873.3</td>\n",
       "      <td>2018-06-12 08:00:00</td>\n",
       "      <td>29725.36</td>\n",
       "      <td>1.979091e+08</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1993</th>\n",
       "      <td>6295.1</td>\n",
       "      <td>6611.70</td>\n",
       "      <td>6107.88</td>\n",
       "      <td>6543.9</td>\n",
       "      <td>2018-06-13 08:00:00</td>\n",
       "      <td>43527.80</td>\n",
       "      <td>2.768046e+08</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1994</th>\n",
       "      <td>6633.7</td>\n",
       "      <td>6736.52</td>\n",
       "      <td>6269.50</td>\n",
       "      <td>6295.1</td>\n",
       "      <td>2018-06-14 08:00:00</td>\n",
       "      <td>30378.99</td>\n",
       "      <td>1.974510e+08</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1995</th>\n",
       "      <td>6385.0</td>\n",
       "      <td>6659.00</td>\n",
       "      <td>6350.00</td>\n",
       "      <td>6633.7</td>\n",
       "      <td>2018-06-15 08:00:00</td>\n",
       "      <td>19631.43</td>\n",
       "      <td>1.278926e+08</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1996</th>\n",
       "      <td>6485.9</td>\n",
       "      <td>6559.70</td>\n",
       "      <td>6330.00</td>\n",
       "      <td>6385.0</td>\n",
       "      <td>2018-06-16 08:00:00</td>\n",
       "      <td>13659.66</td>\n",
       "      <td>8.815980e+07</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1997</th>\n",
       "      <td>6438.4</td>\n",
       "      <td>6573.00</td>\n",
       "      <td>6424.80</td>\n",
       "      <td>6485.9</td>\n",
       "      <td>2018-06-17 08:00:00</td>\n",
       "      <td>8536.56</td>\n",
       "      <td>5.546437e+07</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1998</th>\n",
       "      <td>6709.2</td>\n",
       "      <td>6827.90</td>\n",
       "      <td>6370.77</td>\n",
       "      <td>6438.4</td>\n",
       "      <td>2018-06-18 08:00:00</td>\n",
       "      <td>22902.26</td>\n",
       "      <td>1.508602e+08</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1999</th>\n",
       "      <td>6735.5</td>\n",
       "      <td>6848.20</td>\n",
       "      <td>6655.00</td>\n",
       "      <td>6709.2</td>\n",
       "      <td>2018-06-19 08:00:00</td>\n",
       "      <td>17330.08</td>\n",
       "      <td>1.165402e+08</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2000</th>\n",
       "      <td>6581.4</td>\n",
       "      <td>6739.90</td>\n",
       "      <td>6581.40</td>\n",
       "      <td>6735.5</td>\n",
       "      <td>2018-06-20 08:00:00</td>\n",
       "      <td>104.00</td>\n",
       "      <td>7.003855e+05</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       close     high      low    open                time  volumefrom  \\\n",
       "1981  7521.0  7599.80  7329.19  7485.8 2018-06-01 08:00:00    18921.31   \n",
       "1982  7638.1  7698.80  7441.50  7521.0 2018-06-02 08:00:00    16212.57   \n",
       "1983  7718.0  7779.00  7600.00  7638.1 2018-06-03 08:00:00    13548.01   \n",
       "1984  7488.3  7764.00  7451.10  7718.0 2018-06-04 08:00:00    17659.04   \n",
       "1985  7621.9  7675.00  7372.00  7488.3 2018-06-05 08:00:00    16225.75   \n",
       "1986  7654.0  7700.00  7491.70  7621.9 2018-06-06 08:00:00    16375.07   \n",
       "1987  7688.9  7756.30  7624.70  7654.0 2018-06-07 08:00:00    10828.16   \n",
       "1988  7615.1  7697.00  7543.60  7688.9 2018-06-08 08:00:00    12095.39   \n",
       "1989  7498.5  7685.00  7463.40  7615.1 2018-06-09 08:00:00     6642.77   \n",
       "1990  6758.0  7498.60  6630.00  7498.5 2018-06-10 08:00:00    51853.79   \n",
       "1991  6873.3  6899.00  6629.70  6758.0 2018-06-11 08:00:00    22324.10   \n",
       "1992  6543.9  6873.40  6436.10  6873.3 2018-06-12 08:00:00    29725.36   \n",
       "1993  6295.1  6611.70  6107.88  6543.9 2018-06-13 08:00:00    43527.80   \n",
       "1994  6633.7  6736.52  6269.50  6295.1 2018-06-14 08:00:00    30378.99   \n",
       "1995  6385.0  6659.00  6350.00  6633.7 2018-06-15 08:00:00    19631.43   \n",
       "1996  6485.9  6559.70  6330.00  6385.0 2018-06-16 08:00:00    13659.66   \n",
       "1997  6438.4  6573.00  6424.80  6485.9 2018-06-17 08:00:00     8536.56   \n",
       "1998  6709.2  6827.90  6370.77  6438.4 2018-06-18 08:00:00    22902.26   \n",
       "1999  6735.5  6848.20  6655.00  6709.2 2018-06-19 08:00:00    17330.08   \n",
       "2000  6581.4  6739.90  6581.40  6735.5 2018-06-20 08:00:00      104.00   \n",
       "\n",
       "          volumeto  \n",
       "1981  1.414552e+08  \n",
       "1982  1.236273e+08  \n",
       "1983  1.044172e+08  \n",
       "1984  1.336573e+08  \n",
       "1985  1.218829e+08  \n",
       "1986  1.244910e+08  \n",
       "1987  8.340476e+07  \n",
       "1988  9.209850e+07  \n",
       "1989  5.046706e+07  \n",
       "1990  3.618638e+08  \n",
       "1991  1.505832e+08  \n",
       "1992  1.979091e+08  \n",
       "1993  2.768046e+08  \n",
       "1994  1.974510e+08  \n",
       "1995  1.278926e+08  \n",
       "1996  8.815980e+07  \n",
       "1997  5.546437e+07  \n",
       "1998  1.508602e+08  \n",
       "1999  1.165402e+08  \n",
       "2000  7.003855e+05  "
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 获取日线\n",
    "# 参数：目标币，支付币，交易所\n",
    "df, msg = coin.get_his_day('BTC', 'USD', 'Bitfinex')\n",
    "df.tail(20)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
